using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Bingo.API.Resources
{
    /// <summary>
    /// 资源管理服务
    /// </summary>
    public interface IResources
    {
        /// <summary>
        /// 同步加载AssetBundle里的资源
        /// </summary>
        /// <param name="ownBundle">assetBundle名字</param>
        /// <param name="assetName">资源名字</param>
        /// <typeparam name="T">加载的数据类型</typeparam>
        /// <returns></returns>
        T LoadSync<T>(string ownBundle, string assetName) where T : Object;

        /// <summary>
        /// 只通过资源名字进行同步加载 
        /// </summary>
        /// <param name="assetName">资源名字</param>
        /// <typeparam name="T">加载的数据类型</typeparam>
        /// <returns></returns>
        T LoadSync<T>(string assetName) where T : Object;

        /// <summary>
        /// 只通过资源名字进行同步加载
        /// </summary>
        /// <param name="name">资源名字</param>
        /// <returns></returns>
        Object LoadSync(string name);
    }
}